@(repository: gitbucket.core.service.RepositoryService.RepositoryInfo)(implicit context: gitbucket.core.controller.Context)
@import gitbucket.core.view.helpers
@gitbucket.core.html.main(s"${repository.owner}/${repository.name}", Some(repository)) {
  @gitbucket.core.html.menu("tags", repository){
    <table class="table table-bordered">
      <thead>
        <tr>
          <th width="40%">Tag</th>
          <th width="20%">Date</th>
          <th width="20%">Commit</th>
          <th width="20%">Download</th>
        </tr>
      </thead>
      <tbody>
        @repository.tags.reverse.map { tag =>
          <tr>
            <td><a href="@helpers.url(repository)/tree/@helpers.encodeRefName(tag.name)">@tag.name</a></td>
            <td>@gitbucket.core.helper.html.datetimeago(tag.time, false)</td>
            <td class="monospace"><a href="@helpers.url(repository)/commit/@tag.id">@tag.id.substring(0, 10)</a></td>
            <td>
                <a href="@helpers.url(repository)/archive/@{helpers.encodeRefName(tag.name)}.zip">ZIP</a>
                <a href="@helpers.url(repository)/archive/@{helpers.encodeRefName(tag.name)}.tar.gz">TAR.GZ</a>
            </td>
          </tr>
        }
      </tbody>
    </table>
  }
}
